﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using GPCSC.Model;
using NickLee.Common;
using ExtAspNet;

namespace GPCSC.Web.sjs
{
    public partial class GGHEdit : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnRegister_Click(object sender, EventArgs e)
        {
            CL_USER_S user = reUser();
            string type = Usual.f_querystringToString("type");
            Hashtable htable = new Hashtable();
            htable.Add("HZName", this.HZName.Text);
            htable.Add("HZAdrr", this.HZAdrr.Text);
            htable.Add("HZLXfs", this.HZLXfs.Text);
            htable.Add("lgid",user.CL_USER_SOID.ToString());
            htable.Add("lgname", user.REALNAME.ToString());
            htable.Add("type", type);
            GPCSC.Webs.databyhtable dh = new GPCSC.Webs.databyhtable();
            dh.databyhtables(htable, "add", "GGH_table", "", "");
           // PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
            Alert.Show("添加成功", "", "window.location.href ='GGHList.aspx?type=" + type+ "';");
          //  Response.Write("<script>window.location.href ='GGHList.aspx';</script>");
        }
        public CL_USER_S reUser()
        {

            byte[] userInfo = (byte[])base.o_baseTable[c_obj.s_userInfo];
            Hashtable userInfoTable = CompressData.UnCompressHashtable(userInfo);
            CL_USER_S users = (GPCSC.Model.CL_USER_S)userInfoTable["SYS_USER"];
            return users;
        }
    }
}